<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // let i = 1
    // while (i <= 5) {
    //   if (i === 3) {
    //     break // 退出整个循环
    //   }
    //   document.write(`我要吃第${i}个包子<br>`)
    //   i++
    // }
    let i = 1
    while (i <= 5) {
      if (i === 3) {
        i++
        continue //结束本次循环
      }
      document.write(`我要吃第${i}个包子<br>`)
      i++
    }
  </script>
</body>

</html>